package com.ds.home.database;

import com.ds.home.EIAlarm;
import com.ds.home.EIScene;
import com.ds.home.EIZNode;
import com.ds.home.database.manager.EIDBManager;
import com.ds.home.database.vo.AlarmVO;


/**
 * Alarm entity. @author MyEclipse Persistence Tools
 */

public class DBAlarm implements EIAlarm{

	
	// Constructors

	private AlarmVO vo;

	
	/** full constructor */
	protected DBAlarm(AlarmVO vo) {
	    this.vo=vo;

	}
	

	public String getAlarmid() {
		return vo.getAlarmid();
	}

	public String getAlertcontent() {
		return vo.getAlertcontent();
	}

	public String getComfort() {
		return vo.getComfort();
	}

	public String getCycle() {
		return vo.getCycle();
	}

	public Integer getDelaytime() {
		return vo.getDelaytime();
	}

	public Integer getDevicestatus() {
		return vo.getDevicestatus();
	}

	public String getEndtime() {
		return vo.getEndtime();
	}

	public Integer getIstart() {
		return vo.getIstart();
	}

	public String getName() {

		return vo.getName();
	}

	public Integer getOperatestatus() {
		return vo.getOperatestatus();
	}

	public String getSceneid() {
		return vo.getSceneid();
	}

	public String getSensorid() {
		
		return vo.getSensorid();
	}

	public String getStarttime() {
		return vo.getStarttime();
	}

	

	public void setAlertcontent(String alertcontent) {
		vo.setAlertcontent(alertcontent);
	}

	public void setComfort(String comfort) {
		vo.setComfort(comfort);
	}

	public void setCycle(String cycle) {
		vo.setCycle(cycle);
	}

	public void setDelaytime(Integer delaytime) {
		vo.setDelaytime(delaytime);
	}

	public void setDevicestatus(Integer devicestatus) {
		vo.setDevicestatus(devicestatus);
	}

	public void setEndtime(String endtime) {
		vo.setEndtime(endtime);
	}

	public void setIstart(Integer istart) {
		vo.setIstart(istart);
	}

	public void setName(String name) {
		vo.setName(name);
	}

	public void setOperatestatus(Integer operatestatus) {
		vo.setOperatestatus(operatestatus);
	}

	public void setSceneid(String sceneid) {
		vo.setSceneid(sceneid);
	}

	public void setSensorid(String sensorid) {
		vo.setSensorid(sensorid);
	}

	public void setStarttime(String starttime) {
		vo.setStarttime(starttime);
	}
	
	public EIAlarm clone(String znodeId){
	
		AlarmVO cloneVO=vo.clone();
		cloneVO.setSensorid(znodeId);
	
		return new DBAlarm(cloneVO);
	}

	
	
	public EIScene getScene() {
		EIScene scene=null;
		if (this.getSceneid()!=null){
			scene=MEMManagerImpl.getInstance().getSceneById(this.getSceneid());
		}
	
		return scene;
	}


	public EIZNode getZNode() {

		return MEMManagerImpl.getInstance().getZNodeById(this.getSensorid());
	}


	public AlarmVO getVo() {
		return vo;
	}


	public void setVo(AlarmVO vo) {
		this.vo = vo;
	}
	


}